<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>学生信息管理平台</title>
<link href="css/StudentStyle.css" rel="stylesheet" type="text/css" />
<link href="css/jbox.css" rel="stylesheet" type="text/css" />
<link href="css/ks.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/jBox/jquery.jBox-2.3.min.js" type="text/javascript"></script>
<script src="js/jquery.jBox-zh-CN.js" type="text/javascript"></script>
<script src="js/Common.js" type="text/javascript"></script>
<script src="js/Data.js" type="text/javascript"></script>
<script type="text/javascript">
        $().ready(function () {
            setStudMsgHeadTabCheck();
            showUnreadSysMsgCount();
        });

        //我的信息头部选项卡
        function setStudMsgHeadTabCheck() {
            var currentUrl = window.location.href;
            currentUrl = currentUrl.toLowerCase();
            var asmhm = "";
            $("#ulStudMsgHeadTab li").each(function () {
                asmhm = $(this).find('a').attr("href").toLowerCase();
                if (currentUrl.indexOf(asmhm) > 0) {
                    $(this).find('a').attr("class", "tab1");
                    return;
                }
            });
        }

        //显示未读系统信息
        function showUnreadSysMsgCount() {
            var unreadSysMsgCount = "0";
            if (Number(unreadSysMsgCount) > 0) {
                $("#unreadSysMsgCount").html("(" + unreadSysMsgCount + ")");
            }
        }

        //退出
        function loginOut() {
            if (confirm("确定退出吗？")) {
                StudentLogin.loginOut(function (data) {
                    if (data == "true") {
                        window.location = "/Login.aspx";
                    }
                    else {
                        jBox.alert("退出失败！", "提示", new { buttons: { "确定": true} });
                    }
                });
            }
        }
        //更改报考类别
        function changeCateory(thisObj, id) {
            var oldCateoryId = $("#cateoryId").val();
            var cateoryId = "";
            if (id != null) {
                cateoryId = id;
            }
            else {
                cateoryId = thisObj.val();
            }
            var studentId = $("#studentId").val();
            if (cateoryId.length <= 0) {
                jBox.tip("报考类别不能为空！");
                if (id == null) {
                    thisObj.val(oldCateoryId);
                }
            }
            else {
                studentInfo.changeStudentCateory(cateoryId, function (data) {
                    var result = $.parseJSON(data);
                    if ((String(result.ok) == "true")) {
                        window.location.href = "/Index.aspx";
                    }
                    else {
                        jBox.tip(result.message);
                    }
                });
            }
        }
    </script>

<script src="../Script/Base.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">

        function confirmStatus(sid, examtime, stype) {
            if (confirm("确定确认无误吗？") == true) {
                senateCenter.modifyStudentScoreStatus(sid, examtime, stype, function (data) {
                    var result = $.parseJSON(data);
                    if ((String(result.ok) == "true")) {
                        jBox.alert(result.message, "提示");
                        setTimeout(function () {
                            window.location.reload();
                        }, 1500);
                    }
                    else {
                        $.jBox.error(result.message, '提示');
                    }
                });
            }
        }

        function submitObjection(objId, examtime) {
            var mtitle = "成绩有异议";
            var html = "<div style='padding:10px;'><div style='width:65px; height:120px; float:left;'>异议内容：</div><div style='width:250px; height:120px; float:left;'><textarea id='objeCont' name='objeCont' style='width:250px; height:105px;'></textarea></div></div>";

            var submit = function (v, h, f) {
                if (f.objeCont == '' || f.objeCont.length > 80) {
                    $.jBox.tip("请您输入异议内容，且不超过80个字！", 'error', { focusId: "objeCont" }); // 关闭设置 objeCont 为焦点
                    return false;
                }

                StudentCompain.insertCompain('', mtitle, 2, f.objeCont, function (data) {
                    var obj = $.parseJSON(data);
                    var resultObj = false;
                    if (obj.ok) {
                        senateCenter.modifyStudentScoreStatus(objId, examtime, 3, function (data) {
                            var result = $.parseJSON(data);
                            if ((String(result.ok) == "true")) {
                                jBox.alert("成功提交异议！", "提示");
                                setTimeout(function () {
                                    window.location.reload();
                                }, 1500);
                            }
                            else {
                                jBox.tip("提交异议失败！");
                                return false;
                            }
                        });
                    }
                    else {
                        jBox.tip("提交异议失败！");
                    }
                });
            };

            $.jBox(html, { title: "提交异议", submit: submit });
        }

    </script>
</head>
<body>
	<div class="banner">
		<div class="bgh">
			<div class="page">
				<div class="topxx">
					<span>学号：${s_id}</span> &nbsp;学员：<span>${s_name}</span>，欢迎您！ 
					<a href="../User/Account/ChangePasswd.aspx.html">密码修改</a> 
					<a onclick="loginOut()" href="javascript:">安全退出</a>
				</div>
			</div>
		</div>
	</div>
	<div class="page">
		<div class="box mtop">
			<div class="leftbox">
				<div class="l_nav2">
					<div class="ta1">
						<strong>个人中心</strong>
						<div class="leftbgbt"></div>
					</div>
					<div class="cdlist">
						<div>
							<a href="students_Servlet?action=find_student_name&s_id=${s_id}">我的信息</a>
						</div>
						<div class="ta1">
							<strong>教务中心</strong>
							<div class="leftbgbt2"></div>
						</div>
						<div>
							<a href="sc_Servlet?action=find_stu_sc&s_id=${s_id}&s_name=${s_name}">我的成绩</a>
						</div>
					</div>
				</div>
			</div>
			<div class="rightbox">

				<h2 class="mbx">教务中心 &gt; 我的成绩</h2>
				<div class="cztable">
					<div class="tis red">
						注：请仔细核对自己的考试成绩，如正确请点击“确定无误”，如不正确请点击“有异议”。</div>

					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tbody>
							<tr>
								<td>学生课程Id</td>
								<td>课程名称</td>
								<td>成绩</td>
								<td>授课教师</td>
							</tr>
								<c:forEach var="c" items="${list}">
									<tr>
										<td>${c.sc_id}</td>
										<td>${c.c_name}</td>
										<td>${c.grade}</td>
										<td>${c.t_name}</td>
									</tr>
								</c:forEach>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		<div class="footer">
			<p>&copy;copyright 2019 林峰 linfeng.net 版权所有 站长统计</p>
		</div>
	</div>
</body>
</html>
